<!DOCTYPE html>
<#assign dicSelect=JspTaglibs["http://www.casic304.cn/dicSelect"] />
<#assign secSelect=JspTaglibs["http://www.casic304.cn/secSelect"] />
<#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />
<html>
<head>
    <meta charset="utf-8">
    <title>DPA基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <!--<link rel="stylesheet" href="/qbdmsStatic/style/forms/currencyCss.css">-->
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
    <#if isClose == 'true'>
        <style>
            .listBody .qbdms-bodyDiv{padding: 0 }
            body.qbdms-particulars .qbdms-bodyDiv div.layui-table-view-body{padding: 16px}
            .treeFormPreview{position: unset;}
        </style>
    </#if>
</head>
<body class="listBody qbdms-particulars">
<div class="qbdms-bodyDiv">
    <div class="layui-table-view-body qbdms-add-view-body" >
        <#if isClose != 'true'><div class="qbdms-formTitle" style="border-bottom: 1px solid #E5F0FF">DPA信息 <i class="qbdms-returnOn closeWindow">返回</i></div></#if>
        <form class=" layui-form treeFormPreview" requrl="${ctx}/qbdms/wQbdDpaInfo/get"
              lay-filter="wQbdDpaInfoDataForm">
            <div class="" style="width: 100%;overflow-x: auto">
                <table class="tableExcel qbdms-zeroTable" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr id="tbxx">
                    </tr>

                    <tr>
                        <td class="qbdms-zeroTable-lable">元器件名称<span style="color: red;">*</span></td>
                        <td name='componentsName'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">密级<span style="color: red;">*</span></td>
                        <td> <@secSelect.sec_select required=true data_src=1 name="secret"/></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">DPA分析报告编号<span style="color: red;">*</span></td>
                        <td name='dpaAnalysisReportNo'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">DPA分析时间<span style="color: red;">*</span></td>
                        <td name='dpaAnalysisTime'></td>
                        <input type="hidden" name="dpaAnalysisTime"  placeholder="请输入" lay-reqtext="DPA分析时间是必填项"
                               autocomplete="off" class="layui-input dateTimeFiled textInput time-init" lay-verify="required"
                               maxlength="50" fieldname="dpaAnalysisTime">

                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">元器件型号规格<span style="color: red;">*</span></td>
                        <td name='componentModelSpec'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">元器件生产批号<span style="color: red;">*</span></td>
                        <td name='componentProductionNo'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">生产单位<span style="color: red;">*</span></td>
                        <td name='productionUnit'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">质量等级<span style="color: red;">*</span></td>
                        <td name=''> <@dicSelect.dic name="qualityLevel" verify="required" reqtext="质量等级是必填项" nodeKey="dpazldj" /></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">委托单位<span style="color: red;">*</span></td>
                        <td name='requester'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">DPA试验单位<span style="color: red;">*</span></td>
                        <td name='dpaTestUnit'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">执行标准<span style="color: red;">*</span></td>
                        <td name='execuStandard'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">实际抽样数量<span style="color: red;">*</span></td>
                        <td name='actualNumOfSamples'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">DPA试验结论<span style="color: red;">*</span></td>
                        <td name=''> <@dicSelect.dic name="dpaTestConclusion" reqtext="DPA试验结论是必填项" verify="required" nodeKey="dpasyjl" /></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">不合格项目<span style="color: red;">*</span></td>
                        <td name='unqualifiedItems'></td>
                    </tr>

                    </tbody>
                </table>

            </div>
            <input type="hidden" name="id" placeholder="请输入" autocomplete="off" class="layui-input "
                   maxlength="50" fieldname="id">
            <#if isClose != 'true'>
                <div class="layui-form-item btnformItem">
                    <p>
                        <button type="reset" id="closeWindow"
                                class="closeWindow layui-btn layui-btn-sm btn-save qbdms-oneBtnLine">返回
                        </button>
                    </p>
                </div>
            </#if>

        </form>
    </div>
</div>


<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>

<script>
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'common', 'laydate', 'jquery','publicMethods','propsHandle'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var dateTimeFiledLen = $(".dateTimeFiled");
        var publicMethods = layui.publicMethods;
        var propsHandle = layui.propsHandle;

        var defProps = {
            //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
            viewMould: 'moulds/', // 组件模块 存放文件 *****
            selectorBtn: '.selectorBtn'
        };
        var temQuery = new propsHandle();  // 实例化模板功能部分
        temQuery.initTem({
            selectorBtn: defProps.selectorBtn,
            selectorTemPath: setter.views + defProps.viewMould
        });

        for (var i = 0; i < dateTimeFiledLen.length; i++) {
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                , type: 'date'
                , trigger: 'click'
            });
        }
        //关闭当前页面
        $(".closeWindow").click(function () {
            if ("${isClose}" == "true") {
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            }
            window.location.href =  '${ctx}/qbdms/wQbdDpaInfo/view/list';
        });


        var common = layui.common;
        var index = parent.layer.getFrameIndex(window.name);
        common.updateForm({
            name: 'wQbdDpaInfoDataForm',
            idValue: "${id}",
            primary: "id",
            updateCallback: function (data) {
                if (common.filterRecord(data)) {
                    if ($(".privateSubmit")) {
                        $(".privateSubmit").attr("disabled", false).css("pointer-events", "auto");
                    }
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'}, function (index) {
                        layer.close(index);
                        window.location.href =  '${ctx}/qbdms/wQbdDpaInfo/view/list';
                    });
                } else {
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'});
                }
                return false;
            }
            ,getCallback:function(data){
                // $("#tbxx").html("<span class='qbdms-TBinformation'>填报信息:</span>" +
                //     "<span class='qbdms-TBinformationText'>【"+data.data.filldept+"   | "+data.data.fillman+"  | "+data.data.filldate+"】</span>");
                $("#tbxx").html("<td class='qbdms-zeroTable-lable'>填报信息:</td><td colspan='5' class=''>【"+data.data.filldept+" | "+data.data.fillman+"  | "+data.data.filldate+"】</td>");

            }
        });

        $("body *").not("#closeWindow").attr("disabled","disabled");

    });
</script>
</body>
</html>